package com.neo.office.server.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import lombok.Data;

@Data
@TableName(value = "t_menu")
@ApiModel(value="Menu对象",description = "")
public class Menu implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value="id")
    private Integer id;

    /**
     * url
     */
    @TableField(value = "url")
    @ApiModelProperty(value="url")
    private String url;

    /**
     * path
     */
    @TableField(value = "path")
    @ApiModelProperty(value="path")
    private String path;

    /**
     * 组件
     */
    @TableField(value = "component")
    @ApiModelProperty(value="组件")
    private String component;

    /**
     * 菜单名
     */
    @TableField(value = "name")
    @ApiModelProperty(value="菜单名")
    private String name;

    /**
     * 图标
     */
    @TableField(value = "iconCls")
    @ApiModelProperty(value="图标")
    private String iconCls;

    /**
     * 是否保持激活
     */
    @TableField(value = "keepAlive")
    @ApiModelProperty(value="是否保持激活")
    private Boolean keepAlive;

    /**
     * 是否要求权限
     */
    @TableField(value = "requireAuth")
    @ApiModelProperty(value="是否要求权限")
    private Boolean requireAuth;

    /**
     * 父id
     */
    @TableField(value = "parentId")
    @ApiModelProperty(value="父id")
    private Integer parentId;

    /**
     * 是否启用
     */
    @TableField(value = "enabled")
    @ApiModelProperty(value="是否启用")
    private Boolean enabled;

    /**
     * ===================================================================================
     */

    /**
     * 子菜单
     */
    @ApiModelProperty(value = "子菜单")
    @TableField(exist = false)
    private List<Menu> children = new ArrayList<>();

    /**
     * 角色列表
     */
    @ApiModelProperty(value = "角色列表")
    @TableField(exist = false)
    private List<Role> roles = new ArrayList<>();

}